/**
 * 
 */
package org.estela.stats;

import java.io.Serializable;

/**
 * Probability Estimator ...
 * 
 * @version $Revision$
 * @date Feb 26, 2006
 * @author <a href="mailto:akantek@nyse.com">Antonio Kantek</a>
 */
public interface ProbabilityEstimator extends Serializable {

	/**
	 * The minimum probablility accepted from an estimator to avoid taking
	 * log(0) in Sf calculations.
	 */
	public static final double MIN_SF_PROB = Double.MIN_VALUE;

	/**
	 * Add a new data value to the current estimator.
	 * 
	 * @param data
	 *            the new data value
	 * @param weight
	 *            the weight assigned to the data value
	 */
	void addValue(double data, double weight);

	/**
	 * Get a probability estimate for a value.
	 * 
	 * @param data
	 *            the value to estimate the probability of
	 * @return the estimated probability of the supplied value
	 */
	double getProbability(double data);
}